<!-- BLOG INFORMATION -->
<div id="#PostView">
<div class="post">
	<div class="meta"><?php echo $this->element('meta', array('post' => $post)); ?></div>
	<div class="body">
	<?php
		echo '<h1>' . $this->Html->clean($post['Post']['title']) . '</h1>';
		echo $this->Lil->autop($post['Post']['body']);
	?>
	</div>
</div><!-- .post -->

<div id="CommentList">
<h1><?php __d('lil_blogs', 'Comments'); ?></h1><a name="comments"></a>
</div>

<?php 
	if (empty($post['Comment'])) {
		if ($post['Post']['allow_comments']) {
?>
	<div id="NoComments"><?php __d('lil_blogs', 'No comments yet. Please do add yours.'); ?></div>
<?php
		}
	} else {
	$i = 1;
	foreach($post['Comment'] as $comment) {
?>
	<div class="comment" id="c<?php echo $comment['id']; ?>">
		<div class="meta">
			<div class="commentnumber"><a href="#c<?php echo $comment['id']; ?>">#<?php echo $i++; ?></a>
			<?php echo (strlen($comment['url'])>0) ? $this->Html->link($comment['author'], $comment['url']) : $comment['author']; ?></div>
			<?php __d('lil_blogs', 'Posted'); ?> <?php echo $this->Time->timeAgoInWords($comment['created']); ?>
		</div>
		<div class="message">
			<?php echo $this->Lil->autop($comment['body']); ?>
			<div style="clear: both;"></div>
		</div>
	</div>
<?php }} ?>

<?php if ($post['Post']['allow_comments']) { ?>
	<div class="form" id="CommentForm">
		<a name="addcomment"></a>
		<h1 id="PostComment"><?php __d('lil_blogs', 'Leave a Comment'); ?></h1>
		<?php
			echo $this->Form->create('Comment', array('url'=>Router::url(null, true).'#addcomment'));
			echo $this->Form->hidden('post_id', array('value'=>$post['Post']['id']));
			echo $this->Form->input('author', array('label'=>__d('lil_blogs', 'Author', true).':', 'error'=> __d('lil_blogs', 'Author is required.', true)));
			echo $this->Form->input('email', array('label'=>__d('lil_blogs', 'Email', true).':', 'error'=> __d('lil_blogs', 'Email in proper form is required.', true)));
			echo $this->Form->input('url', array('label'=>__d('lil_blogs', 'Url', true).':'));
			echo $this->Form->input('body', array('label'=>__d('lil_blogs', 'Body', true).':', 'error'=> __d('lil_blogs', 'Body is required.', true)));
			echo $this->Form->submit(__d('lil_blogs', 'Add my comment', true));
		?>
			<div id="formnote"><?php __d('lil_blogs', 'Please be respectful; your comment my be edited or marked as spam, if necessary.'); ?></div>
		<?php echo $this->Form->end(); ?>
	</div>
<?php } else { ?>
	<div id="CommentsClosed"><?php __d('lil_blogs', 'Sorry, comments are closed for this post. If you have any further questions or comments, feel free to contact us.');?></div>
<?php } ?>
</div><!-- #PostView -->